<?php

namespace app\api\controller;

use app\common\controller\Api;

/**
 * 首页接口
 */
class Index extends Api
{
    protected $noNeedLogin = ['*'];
    protected $noNeedRight = ['*'];

    /**
     * 首页
     *
     */
    public function index()
    {
        $temp = 79;
        $tempRate = 99 - $temp;
        $low = 10;
        $height = 20;
        if ($tempRate < $height) {
            $rate = $tempRate;
        } else {
            $rate = mt_rand($low, $height);
        }
        $this->success('请求成功', [$tempRate, $rate]);
    }
}
